<template>
  <div>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="专家列表" name="expert_list">
        <expert_list></expert_list>
      </el-tab-pane>
      <el-tab-pane label="预约表" name="order_list" :testFlag="testFlag">
        <order_list></order_list>
      </el-tab-pane>
    </el-tabs>
  </div>

</template>
<script>
  import Expert_list from "./expert_list";
  import Order_list from "./order_list";
  export default {
    name: 'member',
    components: {Order_list, Expert_list},
    data() {
      return {
        activeName:'expert_list',
        type:"",
        linkType:"",
        testFlag:true
      }
    },
    created() {
      this.type = this.$route.query.type;
    },
    watch: {
      $route(to, from) {
        this.linkType = this.$route.query.linkType;
        if(this.linkType=="order_list"){
          this.activeName="order_list";
        } else if(this.linkType=="expert_list"){
          this.activeName="expert_list";
        }
      }
    },
    methods: {
      handleClick(tab, event) {

      }

    },
    mounted() {
      this.linkType = this.$route.query.linkType;
      if(this.linkType=="order_list"){
        this.activeName="order_list";
      } else if(this.linkType=="expert_list"){
        this.activeName="expert_list";
      }
    },
  }
</script>
<style lang="scss" scoped>

</style>
